Integrand size = 24, antiderivative size = 51 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {a^2 \sin (c+d x)}{3 d}-\frac {2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3577, 2717} \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {a^2 \sin (c+d x)}{3 d}-\frac {2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d} \]
[In]
[Out]
Rule 2717
Rule 3577
Rubi steps \begin{align*} \text {integral}& = -\frac {2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d}+\frac {1}{3} a^2 \int \cos (c+d x) \, dx \\ & = \frac {a^2 \sin (c+d x)}{3 d}-\frac {2 i \cos ^3(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{3 d} \\ \end{align*}
Time = 0.08 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.02 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2 i a^2 \cos ^3(c+d x)}{3 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {2 a^2 \sin ^3(c+d x)}{3 d} \]
[In]
[Out]
Time = 3.13 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.75
method | result | size |
risch | \(-\frac {i a^{2} {\mathrm e}^{3 i \left (d x +c \right )}}{6 d}-\frac {i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{2 d}\) | \(38\) |
derivativedivides | \(\frac {-\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3}-\frac {2 i a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3}+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(54\) |
default | \(\frac {-\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3}-\frac {2 i a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3}+\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(54\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.67 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {-i \, a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 3 i \, a^{2} e^{\left (i \, d x + i \, c\right )}}{6 \, d} \]
[In]
[Out]
Time = 0.15 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.47 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=\begin {cases} \frac {- 2 i a^{2} d e^{3 i c} e^{3 i d x} - 6 i a^{2} d e^{i c} e^{i d x}}{12 d^{2}} & \text {for}\: d^{2} \neq 0 \\x \left (\frac {a^{2} e^{3 i c}}{2} + \frac {a^{2} e^{i c}}{2}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.65 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.02 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2 i \, a^{2} \cos \left (d x + c\right )^{3} + a^{2} \sin \left (d x + c\right )^{3} + {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2}}{3 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 531 vs. \(2 (43) = 86\).
Time = 0.52 (sec) , antiderivative size = 531, normalized size of antiderivative = 10.41 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {24 \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 48 \, a^{2} e^{\left (2 i \, d x\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 24 \, a^{2} e^{\left (-2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 27 \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 54 \, a^{2} e^{\left (2 i \, d x\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 27 \, a^{2} e^{\left (-2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 24 \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 48 \, a^{2} e^{\left (2 i \, d x\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 24 \, a^{2} e^{\left (-2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 27 \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 54 \, a^{2} e^{\left (2 i \, d x\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 27 \, a^{2} e^{\left (-2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 3 \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 6 \, a^{2} e^{\left (2 i \, d x\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 3 \, a^{2} e^{\left (-2 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 3 \, a^{2} e^{\left (4 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 6 \, a^{2} e^{\left (2 i \, d x\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 3 \, a^{2} e^{\left (-2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 16 i \, a^{2} e^{\left (7 i \, d x + 5 i \, c\right )} + 80 i \, a^{2} e^{\left (5 i \, d x + 3 i \, c\right )} + 112 i \, a^{2} e^{\left (3 i \, d x + i \, c\right )} + 48 i \, a^{2} e^{\left (i \, d x - i \, c\right )}}{96 \, {\left (d e^{\left (4 i \, d x + 2 i \, c\right )} + 2 \, d e^{\left (2 i \, d x\right )} + d e^{\left (-2 i \, c\right )}\right )}} \]
[In]
[Out]
Time = 3.71 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.53 \[ \int \cos ^3(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2\,a^2\,\left (3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,3{}\mathrm {i}-2\right )}{3\,d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \]
[In]
[Out]